<%@page import="com.alibaba.fastjson.JSONObject"%>
<%@page import="weaver.general.Util"%>
<%@page import="weaver.conn.RecordSet"%>
<%@page import="com.alibaba.fastjson.JSONArray"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%
String workFlowId = Util.null2String(request.getParameter("workFlowId"));
if("".equals(workFlowId)) workFlowId = "-1";
String sql = "SELECT b.id,b.nodename,a.nodeorder FROM workflow_flownode A LEFT JOIN workflow_nodebase B ON A.nodeid = B.id WHERE A.workflowid = '"+workFlowId+"' order by a.nodeorder,b.id";
RecordSet rs = new RecordSet();
JSONArray arr = new JSONArray();
if(rs.executeSql(sql)){
	while(rs.next()){
		JSONObject json = new JSONObject();
		json.put("value",Util.null2String(rs.getString("id")));
		json.put("label",Util.null2String(rs.getString("nodename")));
		arr.add(json);
	}
}

out.print(arr.toJSONString());

%>